<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>课程选择</title>
<link rel="stylesheet" th:href="@{/styles.css}" />

</head>
<body>
	<h1 align="center">课程选择</h1>
	<form method="POST" th:object="${electionform}" >
	
	<div class="grid">
		<div th:each="type:${types}">
			<div class="course-group" id="${type.toString()}" style="float:left ; width:300px">	
				<h2 th:text="${type.getName()}">课程名</h2>
				<div th:each="course : ${[type.toString()]}">
				 	
					<input name="courses" type="checkbox" th:value="${course.name}" >
					<span th:text="${course.name}">Course</span><br>
				</div>
			</div>
		</div>
		
		
	</div>
	<div align="center"><input type="submit" value="提交" style="width:70px"></div>

	</form>

</body>
</html>